<!--conf
<sample>
               <product version="1.6" edition="std"/>
                       <modifications>
                               <modified date="070101"/>
                       </modifications>
               </sample>
 --> 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Loading from JS array</title>
	<script  src="../common/data.js"></script>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
</head>

<body>
	
	<h1>Loading from JS array</h1>
	<p>You can load grid data from JS array.</p>
	
	<div id="gridbox" style="width:500px; height:270px; background-color:white;"></div>
				
	<br>	
	<a href="javascript:void(0)" onclick='mygrid.clearAll(); alert("old data cleared\nloading new one..."); mygrid.parse(data,"jsarray");'>Reload from JS array object</a>

<script>
	mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath("../../../codebase/imgs/");
	mygrid.setHeader("Sales, Book Title, Author");
	mygrid.setInitWidths("70,250,*")
	mygrid.setColAlign("right,left,left")
	mygrid.setColTypes("dyn,ed,ed");
	mygrid.setColSorting("int,str,str")
	mygrid.init();
	mygrid.setSkin("dhx_skyblue")
	mygrid.load("../common/_data.js","jsarray");
</script>

</body>
</html>
